package com.lucker.ds.model;

/**
 * cai_piao_open_time
 * @author 
 */
public class CaiPiaoOpenTime extends BaseValueObject {
    private Integer id;

    /**
     * 彩种ID
     */
    private String caipiaoTypeId;

    private String caipiaoIssueno;

    /**
     * 开奖时间 格式 15:22:21
     */
    private String openTime;

    /**
     * 地区ID，可不填
     */
    private Long domainId;

    /**
     * 地区名称
     */
    private String domainName;

    /**
     * 彩票ID
     */
    private Long caiId;

    private String customQuerySqlText = null;

    private String orderStr = null;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCaipiaoTypeId() {
        return caipiaoTypeId;
    }

    public void setCaipiaoTypeId(String caipiaoTypeId) {
        this.caipiaoTypeId = caipiaoTypeId;
    }

    public String getCaipiaoIssueno() {
        return caipiaoIssueno;
    }

    public void setCaipiaoIssueno(String caipiaoIssueno) {
        this.caipiaoIssueno = caipiaoIssueno;
    }

    public String getOpenTime() {
        return openTime;
    }

    public void setOpenTime(String openTime) {
        this.openTime = openTime;
    }

    public Long getDomainId() {
        return domainId;
    }

    public void setDomainId(Long domainId) {
        this.domainId = domainId;
    }

    public String getDomainName() {
        return domainName;
    }

    public void setDomainName(String domainName) {
        this.domainName = domainName;
    }

    public Long getCaiId() {
        return caiId;
    }

    public void setCaiId(Long caiId) {
        this.caiId = caiId;
    }

    public void setCustomQuerySqlText(String customQuerySqlText) {
        this.customQuerySqlText = customQuerySqlText;
    }

    public String getCustomQuerySqlText() {
        return customQuerySqlText;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByCaipiaoTypeId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by caipiao_type_id asc";
            }else{
                this.orderStr = this.orderStr + ",caipiao_type_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by caipiao_type_id desc";
            }else{
                this.orderStr = this.orderStr + ",caipiao_type_id desc";
            }
        }
    }

    public void orderByCaipiaoIssueno(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by caipiao_issueno asc";
            }else{
                this.orderStr = this.orderStr + ",caipiao_issueno asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by caipiao_issueno desc";
            }else{
                this.orderStr = this.orderStr + ",caipiao_issueno desc";
            }
        }
    }

    public void orderByOpenTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by open_time asc";
            }else{
                this.orderStr = this.orderStr + ",open_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by open_time desc";
            }else{
                this.orderStr = this.orderStr + ",open_time desc";
            }
        }
    }

    public void orderByDomainId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by domain_id asc";
            }else{
                this.orderStr = this.orderStr + ",domain_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by domain_id desc";
            }else{
                this.orderStr = this.orderStr + ",domain_id desc";
            }
        }
    }

    public void orderByDomainName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by domain_name asc";
            }else{
                this.orderStr = this.orderStr + ",domain_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by domain_name desc";
            }else{
                this.orderStr = this.orderStr + ",domain_name desc";
            }
        }
    }

    public void orderByCaiId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by cai_id asc";
            }else{
                this.orderStr = this.orderStr + ",cai_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by cai_id desc";
            }else{
                this.orderStr = this.orderStr + ",cai_id desc";
            }
        }
    }
}